package com.lyy.override_;


/**
 * @Author: GZQ
 * @date: 2024/11/17 16:24
 * @description: 1. 编写一个Person类，包括/属性private：name，年龄age，构造器，方法：say(返回自我介绍字符串)
 */

public class Person {
    private String name;
    private int age;

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String say(){
        return "我的名字叫"+name+"，今年"+age+"岁了";
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
